-- GENERATED SPELL FOR [Onyx Brood General] --


function spell0_30680(pUnit, Event) --@Avenging Fury,Self--
pUnit:FullCastSpellOnTarget(57742,pUnit)
pUnit:RegisterEvent('Sorts_30680', 574, 1)
end

function spell1_30680(pUnit, Event) --@Devotion Aura,Self--
pUnit:FullCastSpellOnTarget(57740,pUnit)
pUnit:RegisterEvent('Sorts_30680', 601, 1)
end

function spell2_30680(pUnit, Event) --@Devotion Aura,Self--
pUnit:FullCastSpellOnTarget(58944,pUnit)
pUnit:RegisterEvent('Sorts_30680', 654, 1)
end

function spell3_30680(pUnit, Event) --@Draconic Rage,Self--
pUnit:FullCastSpellOnTarget(57733,pUnit)
pUnit:RegisterEvent('Sorts_30680', 30336, 1)
end

function spell4_30680(pUnit, Event) --@Draconic Rage,Self--
pUnit:FullCastSpellOnTarget(58942,pUnit)
pUnit:RegisterEvent('Sorts_30680', 30265, 1)
end

function spell5_30680(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(13737,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30680', 5319, 1)
end

function Sorts_30680(pUnit, Event)
local choix_sorts_30680 = math.random(0, 5)
if choix_sorts_30680 == 0 then
pUnit:RegisterEvent('spell0_30680', 1, 1)
end
if choix_sorts_30680 == 1 then
pUnit:RegisterEvent('spell1_30680', 1, 1)
end
if choix_sorts_30680 == 2 then
pUnit:RegisterEvent('spell2_30680', 1, 1)
end
if choix_sorts_30680 == 3 then
pUnit:RegisterEvent('spell3_30680', 1, 1)
end
if choix_sorts_30680 == 4 then
pUnit:RegisterEvent('spell4_30680', 1, 1)
end
if choix_sorts_30680 == 5 then
pUnit:RegisterEvent('spell5_30680', 1, 1)
end
end

function mob30680_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30680', math.random(1500, 3000), 1)
end

function mob30680_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30680_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30680_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30680, 1, 'mob30680_Action')
RegisterUnitEvent(30680, 2, 'mob30680_Leave')
RegisterUnitEvent(30680, 3, 'mob30680_Kill')
RegisterUnitEvent(30680, 4, 'mob30680_Die')
